﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HlELock.Core
{
    /// <summary>
    /// 自己设备
    /// </summary>
    public class MyCardService : CardService
    {
        public override string IssueCard(string roomNo, DateTime startDate, DateTime endDate, int buildingNumber = 0, int floorNumber = 0, int subRoomNumber = 0)
        {
            var result = MyAppContext.Device.SendHotelCard(startDate, endDate, buildingNumber, floorNumber, roomNo);
            return result.CardCode;
        }

        public override string IssueCheckOutCard()
        {
            var result = MyAppContext.Device.ReturnRoom();
            return result.CardCode;
        }

        public override CardDetailInfo ReadCard()
        {
            var result = MyAppContext.Device.ReadCard();
            return result;
        }
    }
}
